function GetCloumnData(rows, columname) {
	var result = '';
	if (rows == null || rows.length == 0) {
		return '';
	}
	var i = 0;
	for (i = 0; i < rows.length; i++) {
		var r = rows[i];
		result += r[columname] + ",";
	}
	return result;
}

function formatterdate(val, row) {
	if (val == undefined || val == '' || !val) {
		return '';
	}
	var date = new Date(val);
	return date.getFullYear() + '-' + (date.getMonth() + 1) + '-'
			+ date.getDate();
}

function formatterdatesecond(val, row) {
	if (val == undefined || val == '' || !val) {
		return '';
	}
	var date = new Date(val);
	var month;
	if (date.getMonth() < 9) {
		month = "0" + (date.getMonth() + 1);
	} else {
		month = date.getMonth() + 1;
	}
	var day;
	if (date.getDate() < 10) {
		day = "0" + (date.getDate());
	} else {
		day = date.getDate();
	}

	var hours;
	if (date.getHours() < 10) {
		hours = "0" + (date.getHours());
	} else {
		hours = date.getHours();
	}
	var minutes;
	if (date.getMinutes() < 10) {
		minutes = "0" + (date.getMinutes());
	} else {
		minutes = date.getMinutes();
	}
	var seconds;
	if (date.getSeconds() < 10) {
		seconds = "0" + (date.getSeconds());
	} else {
		seconds = date.getSeconds();
	}
	return date.getFullYear() + '-' + month + '-' + day + ' ' + hours + ':'
			+ minutes + ':' + seconds;
}

function formatterdatemilliseconds(val, row) {
	if (val == undefined || val == '' || !val) {
		return '';
	}
	var date = new Date(val);
	var month;
	if (date.getMonth() < 9) {
		month = "0" + (date.getMonth() + 1);
	} else {
		month = date.getMonth() + 1;
	}
	var day;
	if (date.getDate() < 10) {
		day = "0" + (date.getDate());
	} else {
		day = date.getDate();
	}

	var hours;
	if (date.getHours() < 10) {
		hours = "0" + (date.getHours());
	} else {
		hours = date.getHours();
	}
	var minutes;
	if (date.getMinutes() < 10) {
		minutes = "0" + (date.getMinutes());
	} else {
		minutes = date.getMinutes();
	}
	var seconds;
	if (date.getMilliseconds() < 10) {
		seconds = "0" + (date.getMilliseconds());
	} else {
		seconds = date.getMilliseconds();
	}

	return date.getFullYear() + '-' + month + '-' + day + ' ' + hours + ':'
			+ minutes + ':' + seconds;
}